
list(APPEND LIBS "vulkan-1")
#list(APPEND LIBS "VkLayer_utils")

if(CMAKE_SYSTEM_NAME MATCHES "Windows")  # 判断平台
    set(VULKAN_PATH "D:/VulkanSDK/1.2.198.1" CACHE PATH "VulkanSDK Path.")
    set(VULKAN_INCLUDE_DIR "${VULKAN_PATH}/Include" CACHE PATH "VulkanSDK Header Dir.")
    set(VULKAN_LIB_DIR "${VULKAN_PATH}/Lib" CACHE PATH "VulkanSDK Lib Dir.")
else()
    set(VULKAN_PATH "VulkanSDK" CACHE PATH "VulkanSDK Path.")
    set(VULKAN_INCLUDE_DIR "${VULKAN_PATH}/Include" CACHE PATH "VulkanSDK Header Dir.")
    set(VULKAN_LIB_DIR "${VULKAN_PATH}/Lib" CACHE PATH "VulkanSDK Lib Dir.")
endif()


add_library(vulkan INTERFACE)
add_library(vulkan::vulkan ALIAS vulkan)  # 起个别名， 防止混淆


list (JOIN LIBS ";" LIBS)
#message("+++++++++++++++++ ${LIBS}")
target_include_directories(vulkan INTERFACE "${VULKAN_INCLUDE_DIR}")  # 导入的库只能是 INTERFACE
target_link_directories(vulkan INTERFACE "${VULKAN_LIB_DIR}")  # 导入的库只能是 INTERFACE
target_link_libraries(vulkan INTERFACE "${LIBS}")
